UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'U3MuH/boqyvS/+fGsMNUJHRZlcfnEGxPK+dda8H+p9Q='
WHERE
key_id = '109627ebe669ba2af04d80971060084785bb4dfed8a621f72d6af9cf16adcf59'
AND (
token = 'U3MuH/boqyvS/+fGsMNUJHRZlcfnEGxPK+dda8H+p9Q='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)