UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/eTpz49LzrPMUmllcUbO1i6uyqDojdB0JKto/HWWucU='
WHERE
key_id = '0d742ecc232c460d3edd784ae177958a40db1c484efd380df90d6bf0a63284b7'
AND (
token = '/eTpz49LzrPMUmllcUbO1i6uyqDojdB0JKto/HWWucU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)