UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/+VCiCUdazlAF3JiJa+qQnekVxEeILbMmSEF6IZN+LM='
WHERE
key_id = '9e6b3aa989b46e74ab1f28d543a7fd6b5bcf58be8125841212a17cefdcb4f499'
AND (
token = '/+VCiCUdazlAF3JiJa+qQnekVxEeILbMmSEF6IZN+LM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)