UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FjfB/mH/snSV+kX1kBbQ4u66EBOJzM6pMFNX8feN4kg='
WHERE
key_id = '0c25a78475e662dcdc2e7b79d7ac6a07dd9e02f1d2f0e57dfc5294fd0c4ac757'
AND (
token = 'FjfB/mH/snSV+kX1kBbQ4u66EBOJzM6pMFNX8feN4kg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)