UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Yh6HjB6UMVXLD6cBKoiiZKIEx98gQql13qJkkD8L59I='
WHERE
key_id = '88133331329803027faf551e7f60cf8720c449ad01696ff980ed9f5646e97d03'
AND (
token = 'Yh6HjB6UMVXLD6cBKoiiZKIEx98gQql13qJkkD8L59I='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)