UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'BVQG1TRDioiX0W7eDxf2QPfS/Qh1Eg/Smha9FoPmTuc='
WHERE
key_id = 'c72c493b7deae7addb25c0d86c9bb2327c65b1951b63157cbc8d35ea61c41872'
AND (
token = 'BVQG1TRDioiX0W7eDxf2QPfS/Qh1Eg/Smha9FoPmTuc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)