UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/O+GriWIvK21IA4SLoap/d+37dbcaXYjdhN2g5skqQo='
WHERE
key_id = '67803ecb5259a8cda86b2ebfc64795fa9681e323a8ef8bdeebce5787f68ebfe1'
AND (
token = '/O+GriWIvK21IA4SLoap/d+37dbcaXYjdhN2g5skqQo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)