UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Y6uhtn2kRMYAIPGmPN5TppEWTch05K9v7YCiQ/ZamNY='
WHERE
key_id = '2fda662e2620cdd6640be550cca3de2daa0e443bfa0499da7dcc025aac71156c'
AND (
token = 'Y6uhtn2kRMYAIPGmPN5TppEWTch05K9v7YCiQ/ZamNY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)