UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'asdMw7FZTARHw1u+oQkkjIhK4UpDIitlQK/hYGui7Ts='
WHERE
key_id = '4975b7960e8bb09c61cf9838eaa35116d645bf430cf5c7f1382c718cf9cdefea'
AND (
token = 'asdMw7FZTARHw1u+oQkkjIhK4UpDIitlQK/hYGui7Ts='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)