UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '3aPh/bjmsEzFo7OL3g1kUR9+UhyK5y4o2/BQuG9ztBQ='
WHERE
key_id = '3ea8ddab2d12a682f2b85afb4c467db45d1d937969dc5367d640ce0c977663d6'
AND (
token = '3aPh/bjmsEzFo7OL3g1kUR9+UhyK5y4o2/BQuG9ztBQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)