UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'YUIWqYD7EDBRvnvWsarZjdgN+yE3cg6roqz7+ILA9es='
WHERE
key_id = '72de2a70903e7f69697fef2504dcb573a0cca068cb5fdafde3ce0ff9ad97649c'
AND (
token = 'YUIWqYD7EDBRvnvWsarZjdgN+yE3cg6roqz7+ILA9es='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)