UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FVqXCYlWyxecPR54JtsQPxPdolmcbXW9zdSTXRaxSzE='
WHERE
key_id = 'fbb714baa89acdb378f79ed61c8bf4fe0be9a851a32c971343bc85b748075930'
AND (
token = 'FVqXCYlWyxecPR54JtsQPxPdolmcbXW9zdSTXRaxSzE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)