UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'otdLUZk265pFAbGrn/fRxPV/tusjt2C9HY5ArfZH2gU='
WHERE
key_id = '72abb0ac113052fe853072076593a67b68e1c030c3fdffe57cae57138ec13ac8'
AND (
token = 'otdLUZk265pFAbGrn/fRxPV/tusjt2C9HY5ArfZH2gU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)