UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '8VyZnLIAACEraiG2F3u80oLO+IX3oLUSapGlM2VJ6o0='
WHERE
key_id = '513f11f2deeb2bfb7923b092c67842ec937f135a7b8007f4036d4d4e59d6e2d4'
AND (
token = '8VyZnLIAACEraiG2F3u80oLO+IX3oLUSapGlM2VJ6o0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)