UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/yaJxA0SzveTM6HPMTRNsrdPt7lgw7QJWczDR8y8Tuo=' 
WHERE 
  key_id = '0f7f1fe703a0b8792c2e56b5e55d38e4561cd6e9550f30626dc4446aa087d6bf' 
  AND (
    token = '/yaJxA0SzveTM6HPMTRNsrdPt7lgw7QJWczDR8y8Tuo=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00026