UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/2RhshllCipy7A7p6kYjmrhed1/2/yoh5iMaSGGgswA='
WHERE
key_id = 'c27bf0e02aeec51b1c89eb71618f88ef45f0b61b6f49fb8959bfba12df510fa3'
AND (
token = '/2RhshllCipy7A7p6kYjmrhed1/2/yoh5iMaSGGgswA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)