UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '3uVo0GOsTiXu/MqOzB0qCbYUe+ME9NC5Qyd6dP5lIwY='
WHERE
key_id = '3099e55891cab735fe6551ecfbd16da58f8588c58166724046dc5cfec16b91ad'
AND (
token = '3uVo0GOsTiXu/MqOzB0qCbYUe+ME9NC5Qyd6dP5lIwY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)