UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Dx6xOw0nhJHTLZxNmiC+guOCJYeU6R2kmpRRKq7cbO0='
WHERE
key_id = '68ec6df256e8cc8ba6aeb2009657ad80d2daf0ac830d108a98e5262fd55dfaa7'
AND (
token = 'Dx6xOw0nhJHTLZxNmiC+guOCJYeU6R2kmpRRKq7cbO0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)