UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'uQsqTEHCcvG8atoBpJVRu1WxpbkIXza7gTp98cT2+tA='
WHERE
key_id = 'fc082f94adf4f3482346a63d1ce3fe60016c68a047145a0d655d5f6dbb56cb09'
AND (
token = 'uQsqTEHCcvG8atoBpJVRu1WxpbkIXza7gTp98cT2+tA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)