UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '3Rzs0ACRIGnu3dCT9Esa8qCBhJSdXD+b8rcnbsVJ2ic='
WHERE
key_id = 'eea5601d3dac27029a20a629ca9b360be4f6325aea4c6c8fc6b02b63a696d385'
AND (
token = '3Rzs0ACRIGnu3dCT9Esa8qCBhJSdXD+b8rcnbsVJ2ic='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)