UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'SAIFcMOLgjBzAXx62W2HVMxl32z6MejfsZF/40Wv1/Q='
WHERE
key_id = '013f6b281955346a6bfd605a1558cf3eec460f5f80db4bd21953559857ac9867'
AND (
token = 'SAIFcMOLgjBzAXx62W2HVMxl32z6MejfsZF/40Wv1/Q='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)