UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'wWvEiJQONMNbbW7TB9QfPqv/fC5NHG5SlaQJZC0gB+Q='
WHERE
key_id = '609eba7e9bde3131dad63be7b5a8dfad65de28b9f22b6115b5e87972b344188a'
AND (
token = 'wWvEiJQONMNbbW7TB9QfPqv/fC5NHG5SlaQJZC0gB+Q='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)