UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'VCIlrL/TvVzRcxSUjl4uPRHzSS3X7le8Vn16MfIFoMc='
WHERE
key_id = '53d9f1141ae0774b5704724356b6cf2f52cce2c896e8e725179cd130d799e032'
AND (
token = 'VCIlrL/TvVzRcxSUjl4uPRHzSS3X7le8Vn16MfIFoMc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)