UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'LCTVkH1wkJtYOJCqGimVTqqeqOEDslnNHndEbGYm/qg='
WHERE
key_id = '43ca78fb6f83a8eaccb85b816d63ab9669cb2f10384698c7fb2046ebc77a577d'
AND (
token = 'LCTVkH1wkJtYOJCqGimVTqqeqOEDslnNHndEbGYm/qg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)