UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'GLyKgu6K/Q1+Ll6t32A6ptyZteCD4woo5am3sMUjK3I='
WHERE
key_id = '264d4f01f69efcd0c2f430fe48ed35fb02914e9fdc52284083967e48a6e96cc2'
AND (
token = 'GLyKgu6K/Q1+Ll6t32A6ptyZteCD4woo5am3sMUjK3I='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)