UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'lV2WPT++ScY/94Uid8qCykc1g7RIFCer9gVIQoGpvnc='
WHERE
key_id = 'f6e78f9f16a10764849003fd37993e9b2514b8c1eadc95b0d3a950d37c0da186'
AND (
token = 'lV2WPT++ScY/94Uid8qCykc1g7RIFCer9gVIQoGpvnc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)