UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '7+WA9GCAPjZxY3lSJlrATXzHENzIofsCF3BcgexZrUI='
WHERE
key_id = '30f89a9214540a3a53207d14596c4da9c5a8b9c9086a632762ec0ec9edb9db0f'
AND (
token = '7+WA9GCAPjZxY3lSJlrATXzHENzIofsCF3BcgexZrUI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)