UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'jbZo0k8AoxuVIU4IZUNAFyxLYMBcOuFs+e17HmmbDxY='
WHERE
key_id = '00b587c18a275d623894dab23c0aeadf268e892b0acaaf87dc56a5b624981eeb'
AND (
token = 'jbZo0k8AoxuVIU4IZUNAFyxLYMBcOuFs+e17HmmbDxY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)