UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FkO6vIgyZrM78mdbP6A4oZFL840UsV3iOM/WAb9KV3U='
WHERE
key_id = '5be76d2c3c26e82353e46e1b492b404fdd23a7b991ea9609dd1ba22953ba41da'
AND (
token = 'FkO6vIgyZrM78mdbP6A4oZFL840UsV3iOM/WAb9KV3U='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)